
$().ready(function()  {		
	$("#addPaperForm").validate({
	rules: {
		type: {
			required: true
		},
		subType: {
			required: true
		},
		title: {
			required: true,
			minlength: 5
		},
		keywords: {
			required: true,
			minlength: 5
		},
		author: {
			required: true,
			minlength: 5
		},
		source: {
			required: true,
			minlength: 5
		},
		abstracts: {
			required: true,
			minlength: 20
		},
		content: {
			required: true,
			minlength: 50
		}
	},
	messages: {
		type: {
			required:  " * 请选择论文类别！"
		},
		subType: {
			required:  " * 请选择论文子类别！"
		},
		title: {
			required:  " * 请输入论文题目！",
			minlength: " * 论文题目长度太短！"
		},
		keywords: {
			required:  " * 请输入论文题目！",
			minlength: " * 论文关键字长度太短！"
		},
		author: {
			required:  " * 请输入论文作者！",
			minlength: " * 论文作者长度太短！"
		},
		source: {
			required:  " * 请输入论文来源！",
			minlength: " * 论文来源长度太短！"
		},
		abstracts: {
			required:  "		* 请输入论文摘要！",
			minlength: "		* 论文摘要长度太短！"
		},
		content: {
			required:  "		* 请输入论文内容！",
			minlength: "		* 论文内容长度太短！"
		}
	}
	});
});

$().ready(function()  {		
	$("#updatePaperForm").validate({
	rules: {
		type: {
			required: true
		},
		subType: {
			required: true
		},
		title: {
			required: true,
			minlength: 5
		},
		keywords: {
			required: true,
			minlength: 5
		},
		author: {
			required: true,
			minlength: 5
		},
		source: {
			required: true,
			minlength: 5
		},
		abstracts: {
			required: true,
			minlength: 20
		},
		content: {
			required: true,
			minlength: 50
		}
	},
	messages: {
		type: {
			required:  " * 请选择论文类别！"
		},
		subType: {
			required:  " * 请选择论文子类别！"
		},
		title: {
			required:  " * 请输入论文题目！",
			minlength: " * 论文题目长度太短！"
		},
		keywords: {
			required:  " * 请输入论文题目！",
			minlength: " * 论文关键字长度太短！"
		},
		author: {
			required:  " * 请输入论文作者！",
			minlength: " * 论文作者长度太短！"
		},
		source: {
			required:  " * 请输入论文来源！",
			minlength: " * 论文来源长度太短！"
		},
		abstracts: {
			required:  "		* 请输入论文摘要！",
			minlength: "		* 论文摘要长度太短！"
		},
		content: {
			required:  "		* 请输入论文内容！",
			minlength: "		* 论文内容长度太短！"
		}
	}
	});
});

$().ready(function()  {		
	$("#addPaperTypeForm").validate({
	rules: {
		type: {
			required: true,
			minlength: 1
		},
		typeName: {
			required: true,
			minlength: 4
		},
		subType: {
			required: true,
			minlength: 1
		},
		subTypeName: {
			required: true,
			minlength: 4
		}
	},
	messages: {
		type: {
			required:  " * 请输入论文类别！",
			minlength: " * 论文类别长度太短！"
		},
		typeName: {
			required:  " * 请输入论文类别名称！",
			minlength: " * 论文类别名称长度太短！"
		},
		subType: {
			required:  " * 请输入论文子类别！",
			minlength: " * 论文子类别长度太短！"
		},
		subTypeName: {
			required:  " * 请输入论文子类别名称！",
			minlength: " * 论文子类别名称长度太短！"
		}
	}
	});
});

$().ready(function()  {		
	$("#updatePaperTypeForm").validate({
	rules: {
		type: {
			required: true,
			minlength: 1
		},
		typeName: {
			required: true,
			minlength: 4
		},
		subType: {
			required: true,
			minlength: 1
		},
		subTypeName: {
			required: true,
			minlength: 4
		}
	},
	messages: {
		type: {
			required:  " * 请输入论文类别！",
			minlength: " * 论文类别长度太短！"
		},
		typeName: {
			required:  " * 请输入论文类别名称！",
			minlength: " * 论文类别名称长度太短！"
		},
		subType: {
			required:  " * 请输入论文子类别！",
			minlength: " * 论文子类别长度太短！"
		},
		subTypeName: {
			required:  " * 请输入论文子类别名称！",
			minlength: " * 论文子类别名称长度太短！"
		}
	}
	});
});

$().ready(function()  {		
	$("#addNewsForm").validate({
	rules: {
		title: {
			required: true,
			minlength: 5
		},
		author: {
			required: true,
			minlength: 5
		},
		source: {
			required: true,
			minlength: 5
		},
		abstracts: {
			required: true,
			minlength: 20
		},
		content: {
			required: true,
			minlength: 50
		}
	},
	messages: {
		title: {
			required:  " * 请输入咨询标题！",
			minlength: " * 咨询标题长度太短！"
		},
		author: {
			required:  " * 请输入咨询作者！",
			minlength: " * 咨询作者长度太短！"
		},
		source: {
			required:  " * 请输入咨询来源！",
			minlength: " * 咨询来源长度太短！"
		},
		abstracts: {
			required:  "		* 请输入咨询摘要！",
			minlength: "		* 咨询摘要长度太短！"
		},
		content: {
			required:  "		* 请输入咨询内容！",
			minlength: "		* 咨询内容长度太短！"
		}
	}
	});
});


$().ready(function()  {		
	$("#updateNewsForm").validate({
	rules: {
		title: {
			required: true,
			minlength: 5
		},
		author: {
			required: true,
			minlength: 5
		},
		source: {
			required: true,
			minlength: 5
		},
		abstracts: {
			required: true,
			minlength: 20
		},
		content: {
			required: true,
			minlength: 50
		}
	},
	messages: {
		title: {
			required:  " * 请输入咨询标题！",
			minlength: " * 咨询标题长度太短！"
		},
		author: {
			required:  " * 请输入咨询作者！",
			minlength: " * 咨询作者长度太短！"
		},
		source: {
			required:  " * 请输入咨询来源！",
			minlength: " * 咨询来源长度太短！"
		},
		abstracts: {
			required:  "		* 请输入咨询摘要！",
			minlength: "		* 咨询摘要长度太短！"
		},
		content: {
			required:  "		* 请输入咨询内容！",
			minlength: "		* 咨询内容长度太短！"
		}
	}
	});
});

$().ready(function()  {		
	$("#addMagazineForm").validate({
	rules: {
		title: {
			required: true,
			minlength: 2
		},
		type: {
			required: true,
			minlength: 2
		},
		abstracts: {
			required: true,
			minlength: 20
		},
		content: {
			required: true,
			minlength: 50
		}
	},
	messages: {
		title: {
			required:  " * 请输入期刊标题！",
			minlength: " * 期刊标题长度太短！"
		},
		type: {
			required:  " * 请输入期刊类别！",
			minlength: " * 期刊类别长度太短！"
		},
		abstracts: {
			required:  "		* 请输入期刊摘要！",
			minlength: "		* 期刊摘要长度太短！"
		},
		content: {
			required:  "		* 请输入期刊内容！",
			minlength: "		* 期刊内容长度太短！"
		}
	}
	});
});

$().ready(function()  {		
	$("#updateMagazineForm").validate({
	rules: {
		title: {
			required: true,
			minlength: 2
		},
		type: {
			required: true,
			minlength: 2
		},
		abstracts: {
			required: true,
			minlength: 20
		},
		content: {
			required: true,
			minlength: 50
		}
	},
	messages: {
		title: {
			required:  " * 请输入期刊标题！",
			minlength: " * 期刊标题长度太短！"
		},
		type: {
			required:  " * 请输入期刊类别！",
			minlength: " * 期刊类别长度太短！"
		},
		abstracts: {
			required:  "		* 请输入期刊摘要！",
			minlength: "		* 期刊摘要长度太短！"
		},
		content: {
			required:  "		* 请输入期刊内容！",
			minlength: "		* 期刊内容长度太短！"
		}
	}
	});
});

$().ready(function()  {		
	$("#saveAdminForm").validate({
	rules: {
		newpassword: {
			required: true,
			minlength: 5
		},
		qrNewpassword: {
			required: true,
			minlength: 5
		}
	},
	messages: {
		newpassword: {
			required:  " * 请输入密码！",
			minlength: " * 密码长度太短！"
		},
		qrNewpassword: {
			required:  " * 请输入确认密码！",
			minlength: " * 确认密码长度太短！"
		}
	}
	});
	
});


$().ready(function()  {		
	$("#saveLoginUserForm").validate({
	rules: {
		newpassword: {
			required: true,
			minlength: 5
		},
		qrNewpassword: {
			required: true,
			minlength: 5
		}
	},
	messages: {
		newpassword: {
			required:  " * 请输入密码！",
			minlength: " * 密码长度太短！"
		},
		qrNewpassword: {
			required:  " * 请输入确认密码！",
			minlength: " * 确认密码长度太短！"
		}
	}
	});
	
});


$().ready(function()  {		
	$("#addAdminForm").validate({
	rules: {
		username: {
			required: true,
			minlength: 5
		},
		password: {
			required: true,
			minlength: 5
		}
	},
	messages: {
		username: {
			required:  " * 请输入用户名！",
			minlength: " * 用户名长度太短！"
		},
		password: {
			required:  " * 请输入密码！",
			minlength: " * 密码长度太短！"
		}
	}
	});
	
});

